Legend Formatting

When a hierarchy or measure is added to the Color or Shape drop zone, a corresponding legend is automatically added to the canvas. Not only can you change the formatting of these legends, but you can also edit the formatting for the legend's individual elements or values (this is called series editing).

The Formatting panel allows you change the look and feel of the legend by adjusting fonts, layout, position, and more.

  • A legend is automatically added to the canvas when a hierarchy or measure is added to the Color drop zone, whether you're working with charts or grids.
  • Using the Formatting panel and the Formatting Selection tool, you can change the legend's font and layout, and you can position the legend in different locations on the canvas (to the right, left, top, or bottom).
  • You can also reposition the legend by dragging and dropping it.
  • Show or hide the legend as required (by selecting Hide from its context menu, or by selecting the required option from its drop-down menu on the Component ribbon).
  • Any customizations made to the legend will be maintained when the visualization is added to presentations and publications.

Legend Formatting

Legend formatting can be applied from the Formatting panel, or the Legend drop-down in the Component ribbon.

Open the Formatting Panel

There are a few different ways to access the Legend formatting options in the Formatting panel:

  • Use the formatting selection tool to select the legend on the canvas.
  • Click the legend's context menu and click Settings (blue highlight below).
  • If you already have the Formatting panel open, select Legend from the main drop-down menu to see the Legend options.

Legend Options in the Formatting Panel

The following shows the options that you may see in the Formatting panel when you are changing the appearance of a legend.

The options vary slightly depending on if your legend is discrete or continuous:

  • A discrete legend is made up of a list of elements or measures, which are color-coded according to the color assigned to them in the visualization. Whenever a hierarchy or list of elements is added to the color or shape zone, a discrete legend is produced. For more information, see Discrete legends.
  • A continuous legend is one that appears as a continuous line, or box, with a color gradient reflecting the range of values for the given measure within the context of the query. Whenever a measure is placed in the Color zone, a continuous legend is produced. For more information, see Continuous legends.

Settings

The Settings formatting options (green) are used to adjust the position of the legend on the canvas, the alignment of the legend text, and the layout of the columns for discrete legends only (red).

  • Position: Position the legend at the top, bottom, right, or left of the canvas.
  • Layout: (discrete legends only) Change the legend's layout.
    • Auto: When the legend panel is moved to the top or bottom of the canvas, the Number of Columns setting is overridden to automatically display the legend according to the best fit of element labels within the legend panel.
    • Fixed: Manually set the number of columns into which the legend elements will be divided.
    • Wrap: Wrap the legend. This option will display only one column.
  • Columns: (discrete legends only) This option is enabled when Fixed layout is selected; use it to determine the number of columns to split the legend elements into.
  • Align: To position the label horizontally, click the left, center, or right button.
  • Vertical Align: To position the label vertically, click the top, middle, or bottom button.

Title

The Title formatting options (green) are used to adjust the title of the legend including its font settings and the separator under the title. These options are the same for both discrete and continuous legends.

Show Title
  • Show Title: show or hide the legend title.
  • Title: Choose Auto or Custom. Auto generates a title according to the hierarchy or measure in the legend. Custom lets you add your own custom title.
Title Font
  • Font: To use a different font style, click the arrow next to the default font and choose your desired font.
  • Size: To incrementally increase or decrease the font size, click the Increase or Decrease arrows. Otherwise, type the font size you want into the text box.
  • Style: Use the Style options to make the text Bold or Italic. To change the font color, click Font Color (letter 'A' with a colored underscore) and select your required color.
  • Position: To change the position of the title:
    • Auto: Let Pyramid position the title automatically.
    • Horizontal: Position the title horizontally along the first line of the legend's elements.
    • Top Start: Position the title above the legend's first line of elements, on the left side.
    • Top Center: Position the title above the legend's first line of elements, in the middle.
    • Top End: Position the title above the legend's first line of elements, on the right side.
    • Legacy: Apply the legacy position from BI Office.
Title Separator
  • Title Separator: Add a line underneath the title.
  • Thickness: Change the thickness of the title separator.
  • Color: Change the color of the title separator.

Legend

The Legend tab in the Formatting panel is used to adjust the font and other format options for the legend contents (the items in the legend, rather than the title). For discrete legends, you can define the padding between the items; and for the continuous legends, you can set the format string for the labels at either end of the string.

  • Font: change the font type of the legend's elements.
  • Size: change the font size.
  • Style: change the title font style - bold, italics, or color.
  • Padding: (discrete legends only) add padding between each legend element.
  • Format String: (continuous legends only, red) change the format string in the legend.

Gradient (Continuous only)

This option is exposed when working with continuous legends only. Note: The legend that we are formatting in the following example is called "Continuous Example".

  • Band 1: Choose the starting color using the color picker.
  • Band 2: Choose the end color using the color picker.

Component Ribbon: Legend Drop-Down

The Legend drop-down on the Component ribbon lets you show or hide the legend, or change its position on the canvas:

Examples

In this example, the title was made bold and italicized, and a green title separator was added:

Here, the legend was moved to the top of the canvas, and the title position was changed to Horizontal. The font for both title and legend was changed Verdana, and a green title separator was added.